package basic;

import java.util.LinkedList;

public class Round {

	private int round = 0;
	private LinkedList<Match> matches = null;
	
	public Round() {
		super();
		this.round = 0;
		this.matches = null;
	}

	public Round(int round, LinkedList<Match> matches) {
		super();
		this.round = round;
		this.matches = matches;
	}

	public Round(int round) {
		super();
		this.round = round;
		this.matches = new LinkedList<Match>();
	}
	
	public void addMatchToRound(Match match){
		if (matches != null){
			matches.add(match);	
		} else {
		System.out.println("error");
		}
	}
	public void removeMatchFromRound(Match match){
		for (int i = 0; i < matches.size(); i++) {
			if (matches.get(i).equals(match)){
				matches.remove(i);
			}
		}
	}
	public int getRound() {
		return round;
	}
	public void setRound(int round) {
		this.round = round;
	}
	public LinkedList<Match> getMatches() {
		return matches;
	}
	public void setMatches(LinkedList<Match> matches) {
		this.matches = matches;
	}

}
